<!DOCTYPE HTML>
<html>

<head>
    <title>物料返还</title>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <link rel="stylesheet" type="text/css" href="../css/api.css" />
    <link rel="stylesheet" type="text/css" href="../css/aui.css" />
    <link rel="stylesheet" type="text/css" href="../css/aui-pull-refresh.css" />
    <link rel="stylesheet" type="text/css" href="../css/iconfont.css" />
    <link rel="stylesheet" type="text/css" href="./css/headersearch.css" />
    <link rel="stylesheet" type="text/css" href="./css/comm.css" />
    <link rel="stylesheet" type="text/css" href="css/chooseserviceuser.css" />
    <link rel="stylesheet" type="text/css" href="./css/chooseckproduct_frm.css" />
    <style>
    </style>
</head>

<body>
    <div id="app" v-cloak>
        <section class="aui-content contentBox">
            <div v-on:click="doHideSearch()" v-if="showsearch" class="maskbg">
            </div>

            <!-- 搜索 -->
            <div class="aui-searchbar" id="search">
                <div class="aui-searchbar-input aui-searchbar-input-white aui-border-radius">
                    <i class="icon iconfont icon-sousuo"></i>
                    <input v-model="form.keywords" type="search" placeholder="物料名称" id="search-input">
                    <div class="aui-searchbar-clear-btn" style="top:12px">
                        <i class="icon iconfont icon-guanbi"></i>
                    </div>
                </div>
                <div class="aui-searchbar-btn" tapmode></div>
            </div>

            <div v-if="list.length>0"  class="aui_list boxarea mb20">
                <div v-for="(item,index) in list" class="aui-list-item border-bottomLine" >
                    <div class="list_flex_sty ptb5 fs16">
                        <div class="list_title">
                            {{item.ProductName}}
                            <span v-if="item.ModelNumber!=''" class="list-shu">|</span>
                            {{item.ModelNumber}}{{item.Unit}}
                        </div>
                        <div class="list_title_btn" v-if="item.Applicationstatus!==1">
                            <span v-if="item.Applicationstatus===3" v-on:click="productDelete(item.ID)">删除</span>
                            <span v-if="item.Applicationstatus===2" v-on:click="productClose(item.ID)">关闭</span>
                        </div>
                    </div>
                    <div class="list_flex_sty ptb5 ccc ">
                        <span>申请数量<i class="icon iconfont icon-jia fff fz12" v-if="item.Applicationstatus===3"></i></span> 
                        <label class="ml10">{{item.InTotalCount}}</label>
                    </div>
                    <div class="list_flex_sty ptb5 ccc ">
                        <span>领用数量</span> 
                        <label class="ml10">{{item.ApproveOutCount}}</label>
                    </div>
                    <div class="list_flex_sty pb10 ccc ">
                        <div class="product_back_box">
                            <span>返还数量</span>
                            <div class="product_back_text">
                                <span v-if="item.ApplicationBackCount>0" class="productbackresiduesty">(返还中:{{item.ApplicationBackCount}})</span>
                                <span v-if="item.ApproveBackCount>0">(已返还:{{item.ApproveBackCount}})</span>
                            </div>
                        </div>
                        <label class="ml10" v-if="item.Applicationstatus===1 && item.ApproveOutCount > (item.ApplicationBackCount + item.ApproveBackCount)">
                            <span v-if="item.backNumber>0" v-on:click="delQuantity(item)" class="new-jian-bg"> <i class="icon iconfont icon-jian  text-blue fz12 "></i></span>
                            <a v-if="item.backNumber>0" class="new-phone_a mlr10">
                                <input type="number" name="" v-model="item.backNumber">
                            </a>
                            <span v-on:click="addQuantity(item)" class="new-jia-bg"><i class="icon iconfont icon-jia fff fz12"></i></span>
                        </label>
                        <div v-if="item.Applicationstatus!==1">
                            <span v-if="item.Applicationstatus==3">暂未领料</span>
                            <span v-if="item.Applicationstatus==2">部分领料</span>
                        </div>
                    </div>
                </div>
            </div>

            <div v-if="list.length>0" class="notodayList ccc">
                没有更多内容
            </div>

        </section>

        <div v-if="showchoose" class="choose-list">
            <div class="choose-header border-bottomLine">
                已选：{{totalQuantity}}
                <label v-on:click="showChooseAll()" class="header-close">
                    <i  class="icon iconfont icon-shoulishibaiicon fr"></i>
                </label>

            </div>

            <div v-if="chooseList.length>0" class="aui-content aui-margin-b-15 pt50">
                <div class="aui-list aui-media-list">
                    <div v-for="(item,index) in chooseList" class="aui-list-item" style="display: block;" >
                        <div class="aui-media-list-item-inner ptb " v-bind:class="{'border-bottomLine':index<chooseList.length-1}">
                            <div class="aui-list-item-inner aui-padded-t-10 aui-padded-b-10" style="display: block;">
                                <div class="aui-list-item-text">
                                    <div class="aui-list-item-title">
                                        {{item.ProductName}}<span class="list-shu">|</span>{{item.ModelNumber}}{{item.Unit}}
                                    </div>
                                    <div class="aui-list-item-right" style="width:160px;">
                                        <span v-on:click="delQuantity(item)"  class="new-jian-bg"> <i class="icon iconfont icon-jian  text-blue fz12 "></i></span>
                                        <a class="phone_a new-right">
                                            <input type="number" name="" v-model="item.backNumber" v-on:change="onChangeQuantity(item)">
                                        </a>
                                        <span v-on:click="addQuantity(item)" class="new-jia-bg fr"><i class="icon iconfont icon-jia fff fz12"></i></span>
                                    </div>
                                </div>

                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="aui_bottom">
            <div v-on:click="showChooseAll()" class="left-btn">
                <div class="aui-content-padded">
                    <p><i class="icon iconfont  icon-gouwulan- text-blue fz36"></i></p>
                    <div class="aui-badge">{{totalQuantity}}</div><Br />
                </div>
            </div>
            <div v-on:click="do_save()" class="right-btn">确认返还</div>
        </div>
    </div>
</body>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript" src="../script/aui-toast.js"></script>
<script type="text/javascript" src="../script/aui-scroll.js"></script>
<script type="text/javascript" src="../script/vue.js"></script>
<script type="text/javascript" src="../script/config.js "></script>
<script type="text/javascript" src="../script/common.js "></script>
<script type="text/javascript" src="js/choosefhproduct.js"></script>

</html>
